package com.automobile.backstage.dao;

import com.automobile.backstage.domain.CarType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CarTypeDao {
	
	@Select("select * from type")
	List<CarType> findCarTypeAll();
	
	@Select("select id from type where name = #{name}")
	int findIdByName(String name);

	@Select("select name from type where  id = #{id}")
    String findNameById(int id);
	
}
